www.gusucode.com > 6KBBS ASP版 V7.1 > 6KBBS ASP版 V7.1\code\bbs\Topiclist.asp
<!--#include file="up.asp"--><!--#include file="inc/page.asp"--> <% checklg() dim topicinfo,retopic,reinfo,renum,repage,n,nn,hot,width,face if isnull(lguserid) or lguserid="" then if conn.execute("select userid from online where ip='"&ip&"'").eof then sql="insert into online(ip,lasttime,onbd,nowon) values('"&ip&"',now(),"&bd&",'"&bdinfo(0)&"')" else sql="update online set userid=0,name='',lasttime=now(),pic=0,onbd="&bd&",nowon='"&bdinfo(0)&"' where ip='"&ip&"'" end if else if conn.execute("select userid from online where userid="&lguserid&" or ip='"&ip&"'").eof then sql="insert into online(userid,name,ip,lasttime,pic,onbd,nowon) values("&lguserid&",'"&lgname&"','"&ip&"',now(),"&usertype&","&bd&",'"&bdinfo(0)&"')" else sql="update online set userid="&lguserid&",name='"&lgname&"',ip='"&ip&"',lasttime=now(),pic="&usertype&",onbd="&bd&",nowon='"&bdinfo(0)&"' where userid="&lguserid&" or ip='"&ip&"'" end if end if conn.execute(sql) conn.execute("delete * from online where now()-lasttime>"&onlinetime&"/24") dim action,sql,wzcount,wzrep,wzpagecount,wzpage,pagestr,urlstr urlstr="bd="&bd&"&action="&action wzrep=application(prefix&"topiclistpage") action=request.querystring("action") wzpage = clng(request.querystring("page")) %> <div class=topiclisttop> <div class=topiclistgg> <SCRIPT src=inc/menu.js></script><%dim papern,paper,papers papern=0 response.write"<script>messages = new Array()" set papers=conn.execute("select*from paper where bd="&bd&" order by id desc") if papers.eof then%> messages[0]=" 当前没有公告" <% else do while not papers.eof paper=papers("paper") paper=split(paper,"|") %> messages[<%=papern%>]=" <a href=# onclick=openscript('paper.asp?id=<%=papers("id")%>')><span class=ggfont><%=checktitle(lefttrue(paper(0),45))%> [ <%=paper(2)%> ]</span></a>" <% papern=papern+1 papers.movenext loop end if set papers=nothing response.write"</script>" %><div id=content></div><SCRIPT>jspaper()</SCRIPT> 本版帖数:<%=topicnum%>, 今日帖数:<font color=red><%=todaynum%></font>, <%if isnull(thisbdadmin) or thisbdadmin="" then:response.write"本版面还没有版主":else:response.write"本版版主:"&replace(checktitle(thisbdadmin),"|"," ")&"":end if%> </div> <% dim adminmenu,quickglmenu quickglmenu=Request.cookies(prefix&"2")("quickgl") adminmenu="<a href=adminbd.asp?bd="&bd&"&action=gonggao>发布公告</a><br><a href=adminbd.asp?bd="&bd&"&action=gonggaogl>公告管理</a><br>" if bdtype=3 then adminmenu=adminmenu&"<a href=adminbd.asp?action=passuser&bd="&bd&">认证用户</a><br>" adminmenu=adminmenu&"<a href=adminbd2.asp?action=recycle&bd="&bd&">回收站</a><br>" if quickglmenu=1 then adminmenu=adminmenu&"<a href=adminbd3.asp?action=closequickgl>关闭快捷管理</a><br>" else%> <style> .tchoose{display:none;} .tlchoose{display:none;} .topiclistgl{display:none;} .topiclistglchoose{display:none;} .topiclistglmenu{display:none;} </style> <% adminmenu=adminmenu&"<a href=adminbd3.asp?action=openquickgl>开启快捷管理</a><br>" end if response.write"<script>var adminmenu='"&adminmenu&"';</script>" response.write"<div class=topiclistadmin><a target=_blank href=Rss.asp?bd="&bd&"&action="&action&"&page="&wzpage&" title='订阅本版贴子'><img border=0 src=images/rss.png align=absmiddle></a> | <a href=# onmouseover=ShowMenu(adminmenu,100,event)>管理选项</a> | <a href='?bd="&bd&"&action=good'>本版精华</a></div>" %> </div> <% '_____________________________________________________________________________________________________________________________________________ dim newtopicbutton newtopicbutton="<div class=newtopicbutton><a href='addtopic.asp?bd="&bd&"&topictype=1'><img border=0 src='"&styleid&"/fabiao.gif'></a> <a href='addtopic.asp?bd="&bd&"&topictype=1&vote=1'><img border=0 src='"&styleid&"/vote.gif'></a></div>" if action="good" then sql="select*from topic where bd="&bd&" and type=1 order by top desc,edittime desc" else sql="select*from topic where (bd="&bd&" or top=2) and type<>3 order by top desc,edittime desc" end if set rs = server.createobject("adodb.recordset") rs.Open sql,conn,1 if rs.eof or rs.bof then response.write"<div class=norecord>暂无记录。</div>"&newtopicbutton else wzcount=rs.recordcount conn.execute("update bdinfo set topicnum="&wzcount&" where id="&bd&" and followid<>0") wzpagecount = abs(int(-abs(wzcount/wzrep))) if len(wzpage) = 0 or wzpage = 0 then wzpage = 1 rs.absoluteposition=rs.absoluteposition+((abs(wzpage)-1)*wzrep) pagestr="每页<font color=red>"&wzrep&"</font>条 共<font color=red>"&wzpagecount&"</font>页 ["&pagination(wzpagecount,urlstr)&"] " response.write"<div class=toplistpagestr>"&pagestr&"</div>" response.write newtopicbutton %> <div class=alltopic><form id="ctop" action="adminbd3.asp?bd=<%=bd%>" method="POST" onsubmit="return chooseac();"> <div class=topictop><div class=tchoose>选择</div><div class=tface>表情</div><div class=ttopic>主题 (点击表情在新窗口打开)</div><div class=tauthor>作者</div><div class=thits>回复/人气</div><div class=tlastre>最后回复</div></div> <% for i = 0 to wzrep-1 if rs.eof then exit for topicinfo=rs("topicinfo") topicinfo=split(topicinfo,"|") retopic=rs("retopic") if isnull(retopic) or retopic="" then reinfo="——" retopic="未有人回复。|——|0" retopic=split(retopic,"|") else retopic=split(retopic,"|") reinfo="<a href=userinfo.asp?userid="&retopic(2)&">"&checktitle(retopic(1))&"</a>" end if renum=rs("renum") hot=checknum(application(prefix&"showbbspage")) if renum/hot>(renum\hot) then repage=(renum\hot)+1 else repage=renum\hot end if width=35 face=topicinfo(0) if rs("type")=1 then face="jing" if rs("type")=2 then face="lock" if rs("top")=1 then face="top" if rs("top")=2 then face="alltop" if repage>1 then width=25 response.write"<div class=topiclist><div class=tlchoose><input type=checkbox name=topicids value="&rs("id")&"></div><div class=tlface><img border=0 src=images/face/"&face&".gif></div><div class=tltopic><a href='showbbs.asp?bd="&rs("bd")&"&id="&rs("id")&"&totable="&rs("totable")&"' title='最后回复:"&checktitle(retopic(0))&"'>"&topicinfo(3)&" <font color="&replacecolor(checktitle(topicinfo(1)))&">"&lefttrue(checktitle(topicinfo(1)),width)&"</font></a>" if repage>1 then response.write" <img align=absmiddle border=0 src=images/hot.gif> <span class=hotfont>[</span><b> " if repage<=4 then for n=1 to repage response.write"<a href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&page="&n&"><span class=hotfont>"&n&"</span></a> " next else for nn=1 to 3 response.write"<a href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&page="&nn&"><span class=hotfont>"&nn&"</span></a> " next response.write"... <a href=showbbs.asp?id="&rs("id")&"&bd="&rs("bd")&"&totable="&rs("totable")&"&page="&repage&"><span class=hotfont>"&repage&"</span></a> " end if response.write" </b><span class=hotfont>]</span>" end if response.write"</div><div class=tlauthor><a href=userinfo.asp?userid="&rs("userid")&">"&checktitle(topicinfo(2))&"</a></div><div class=tlhits>"&renum&"/"&rs("hits")&"</div><div class=tllastre>"&reinfo&"<br><span class=tllasttime>"&rs("edittime")&"</span></div></div>" rs.movenext next%> <div class=topiclistgl><div class=topiclistglchoose><input type=checkbox id=topicallchoose onclick="checkAllTopic()"> 全选</div><div class=topiclistglmenu> <select name="chooseaction" size="1"> <option selected value="0">选择操作</option> <option value="1">置顶</option> <option value="2">取消置顶</option> <option value="3">精华</option> <option value="4">取消精华</option> <option value="5">锁定</option> <option value="6">解锁</option> <option value="7">删除</option> <option value="8">移动</option> <option value="9">提升</option> </select> <script> function chooseac(){ var chooseactionname=document.getElementsByName("chooseaction").item(0); var chooseint=chooseactionname.selectedIndex; var choosetext=chooseactionname.options[chooseint].text; if(chooseint==0){alert("请选择帖子的操作!");return false;} else if(confirm('你确定要进行选择的操作('+choosetext+')吗?')){return true;}else{return false;} } </script> <input type="submit" value=" 提交 " name="B1"> <script> function checkAllTopic(){ var allcheck=document.getElementById("topicallchoose").checked; var topicall=document.getElementsByName("topicids"); for(var i=0;i<topicall.length;i++){ topicall.item(i).checked=allcheck; } } </script> </div></div></form> </div> <% end if rs.Close set rs=nothing response.write"<div class=toplistpagestr>"&pagestr&"</div>" %> <%if bd<>0 then if bdad(1)<>"" then response.write "<div class=topad>"&bdad(1)&"</div>" end if%> <% dim onbd1,onbd2 onbd1=conn.execute("select count(userid) from online where onbd="&bd&"")(0) onbd2=conn.execute("select count(userid) from online where onbd="&bd&" and userid=0")(0) %> <SCRIPT>var checktj;checktj=1;function tj0(){if(onlinetj.style.display==""){onlinetj.style.display = "none";}else{onlinetj.style.display="";if (checktj==1){tj.location="online.asp?onlinetj=bd&bd=<%=bd%>";}checktj=2;}}</SCRIPT> <div class=bbsonline> <div class=bbsonlinetop>在线统计:</div> <div class=bbsonlinetitle>目前本版面总共有 <font color="#FF0000"><%=onbd1%></font> 人在线。其中有 <font color="#FF0000"><%=onbd1-onbd2%></font> 位会员, <%=onbd2%> 位游客。 [ <a onclick=tj0()><SPAN style='CURSOR: pointer'>详细列表</span></a> ]</div> <div class=bbsonlinebody id=onlinetj style="display:none;"><iframe name=tj marginwidth=3 marginheight=2 width=100% border=0 frameborder=0 height=65></iframe></div> </div> <%call down%>